﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="show_tttn.aspx.cs" Inherits="SQT.tracnghiem.Ajax.ASP.Events.show_tttn" %>

<%@ Import Namespace="DataAccess" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<body>
    <%
        int event_id = int.Parse(Request.QueryString["event_id"]);
        int type = int.Parse(Request.QueryString["type"]);
        int question = int.Parse(Request.QueryString["question"]);

        var get_player = new TblEventRoomController().FetchAll().Where(x => x.EventId == event_id && x.GameType == type && x.GameId == question);
        if (get_player.ToList().Count != 0)
        {
            var get_user = new TblUserController().FetchAll().Single(x => x.UserId == get_player.Last().PlayerId);
    %>
    <div class='eve-team-index w3-row'>
        <div class='eve-team-answer-time w3-quarter w3-center w3-dark-grey'>1</div>
        <div class='w3-threequarter'>
            <div class='eve-team-name-index'>
                <div class='eve-team-name-answer w3-center w3-padding-4 w3-teal'><%=get_user.FullName %></div>
            </div>
            <div class='eve-team-answer'>
                <div class='eve-team-answer-detail w3-row w3-dark-grey'>
                    <%if (get_player.Last().PlayerRequest.Trim() == "")
                        { %>&nbsp;<%}
                                         else
                                         {%><%=get_player.Last().PlayerRequest.Trim() %><%} %>
                </div>
            </div>
        </div>
    </div>
    <%}%>
</body>
</html>
